package com.chujian.client.wx;

import com.chujian.framework.constant.ChujianAppConst;
import com.chujian.framework.core.tsdata.Result;
import com.chujian.wx.constant.ChujianWxConst;
import com.chujian.wx.entity.WxMinipUser;
import com.chujian.wx.vo.GetMaUserInfoVo;
import com.chujian.wx.vo.GetPhoneInfoVo;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestHeader;

@FeignClient(value = ChujianAppConst.WX_SERVICES_NAME, contextId = "WxMaClient")
public interface WxMaClient {

    /**
     * 获取用户手机号信息
     *
     * @param appId
     * @param getMaUserInfoVo
     * @return
     */
    @PostMapping("/wxma/getUserInfo")
    Result<WxMinipUser> getUserInfo(@RequestHeader(ChujianWxConst.APP_ID_HEADER) String appId, @RequestBody GetMaUserInfoVo getMaUserInfoVo);

    /**
     * 获取用户手机号信息
     *
     * @param appId
     * @param getPhoneInfoVo
     * @return
     */
    @PostMapping("/wxma/getUserPhone")
    Result<String> getUserPhone(@RequestHeader(ChujianWxConst.APP_ID_HEADER) String appId, @RequestBody GetPhoneInfoVo getPhoneInfoVo);

}
